<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var num = Number(prompt('输入一个数'))
    var ge = num%10;
    var shi = parseInt(num/10)%10;
    var bai = parseInt(num/100);
    if(ge**3 + shi**3 + bai**3 == num){
        alert('是水仙花数')
    }else{
        alert('不是水仙花数')
    }
</script>